PM566 HW1

Author

Katherine

library(readr)
data2002 <- read_csv("~/Downloads/2002 .csv")
Rows: 15976 Columns: 22
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (12): Date, Source, Site ID, Units, Local Site Name, AQS Parameter Descr...
dbl (10): POC, Daily Mean PM2.5 Concentration, Daily AQI Value, Daily Obs Co...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
data2022 <- read_csv("~/Downloads/2022 .csv")
Rows: 59918 Columns: 22
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (12): Date, Source, Site ID, Units, Local Site Name, AQS Parameter Descr...
dbl (10): POC, Daily Mean PM2.5 Concentration, Daily AQI Value, Daily Obs Co...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Question 1:

dim(data2002)
[1] 15976    22
nrow(data2002)
[1] 15976
ncol(data2002)
[1] 22
head(data2002)
# A tibble: 6 × 22
  Date     Source `Site ID`   POC Daily Mean PM2.5 Con…¹ Units `Daily AQI Value`
  <chr>    <chr>  <chr>     <dbl>                  <dbl> <chr>             <dbl>
1 01/05/2… AQS    060010007     1                   25.1 ug/m…                81
2 01/06/2… AQS    060010007     1                   31.6 ug/m…                93
3 01/08/2… AQS    060010007     1                   21.4 ug/m…                74
4 01/11/2… AQS    060010007     1                   25.9 ug/m…                82
5 01/14/2… AQS    060010007     1                   34.5 ug/m…                98
6 01/17/2… AQS    060010007     1                   41   ug/m…               115
# ℹ abbreviated name: ¹​`Daily Mean PM2.5 Concentration`
# ℹ 15 more variables: `Local Site Name` <chr>, `Daily Obs Count` <dbl>,
#   `Percent Complete` <dbl>, `AQS Parameter Code` <dbl>,
#   `AQS Parameter Description` <chr>, `Method Code` <dbl>,
#   `Method Description` <chr>, `CBSA Code` <dbl>, `CBSA Name` <chr>,
#   `State FIPS Code` <chr>, State <chr>, `County FIPS Code` <chr>,
#   County <chr>, `Site Latitude` <dbl>, `Site Longitude` <dbl>
tail(data2002)
# A tibble: 6 × 22
  Date     Source `Site ID`   POC Daily Mean PM2.5 Con…¹ Units `Daily AQI Value`
  <chr>    <chr>  <chr>     <dbl>                  <dbl> <chr>             <dbl>
1 12/10/2… AQS    061131003     1                     15 ug/m…                62
2 12/13/2… AQS    061131003     1                     15 ug/m…                62
3 12/22/2… AQS    061131003     1                      1 ug/m…                 6
4 12/25/2… AQS    061131003     1                     23 ug/m…                77
5 12/28/2… AQS    061131003     1                      5 ug/m…                28
6 12/31/2… AQS    061131003     1                      6 ug/m…                33
# ℹ abbreviated name: ¹​`Daily Mean PM2.5 Concentration`
# ℹ 15 more variables: `Local Site Name` <chr>, `Daily Obs Count` <dbl>,
#   `Percent Complete` <dbl>, `AQS Parameter Code` <dbl>,
#   `AQS Parameter Description` <chr>, `Method Code` <dbl>,
#   `Method Description` <chr>, `CBSA Code` <dbl>, `CBSA Name` <chr>,
#   `State FIPS Code` <chr>, State <chr>, `County FIPS Code` <chr>,
#   County <chr>, `Site Latitude` <dbl>, `Site Longitude` <dbl>
dim(data2022)
[1] 59918    22
nrow(data2022)
[1] 59918
ncol(data2022)
[1] 22
head(data2022)
# A tibble: 6 × 22
  Date     Source `Site ID`   POC Daily Mean PM2.5 Con…¹ Units `Daily AQI Value`
  <chr>    <chr>  <chr>     <dbl>                  <dbl> <chr>             <dbl>
1 01/01/2… AQS    060010007     3                   12.7 ug/m…                58
2 01/02/2… AQS    060010007     3                   13.9 ug/m…                60
3 01/03/2… AQS    060010007     3                    7.1 ug/m…                39
4 01/04/2… AQS    060010007     3                    3.7 ug/m…                21
5 01/05/2… AQS    060010007     3                    4.2 ug/m…                23
6 01/06/2… AQS    060010007     3                    3.8 ug/m…                21
# ℹ abbreviated name: ¹​`Daily Mean PM2.5 Concentration`
# ℹ 15 more variables: `Local Site Name` <chr>, `Daily Obs Count` <dbl>,
#   `Percent Complete` <dbl>, `AQS Parameter Code` <dbl>,
#   `AQS Parameter Description` <chr>, `Method Code` <dbl>,
#   `Method Description` <chr>, `CBSA Code` <dbl>, `CBSA Name` <chr>,
#   `State FIPS Code` <chr>, State <chr>, `County FIPS Code` <chr>,
#   County <chr>, `Site Latitude` <dbl>, `Site Longitude` <dbl>
tail(data2022)
# A tibble: 6 × 22
  Date     Source `Site ID`   POC Daily Mean PM2.5 Con…¹ Units `Daily AQI Value`
  <chr>    <chr>  <chr>     <dbl>                  <dbl> <chr>             <dbl>
1 12/01/2… AQS    061131003     1                    3.4 ug/m…                19
2 12/07/2… AQS    061131003     1                    3.8 ug/m…                21
3 12/13/2… AQS    061131003     1                    6   ug/m…                33
4 12/19/2… AQS    061131003     1                   34.8 ug/m…                99
5 12/25/2… AQS    061131003     1                   23.2 ug/m…                77
6 12/31/2… AQS    061131003     1                    1   ug/m…                 6
# ℹ abbreviated name: ¹​`Daily Mean PM2.5 Concentration`
# ℹ 15 more variables: `Local Site Name` <chr>, `Daily Obs Count` <dbl>,
#   `Percent Complete` <dbl>, `AQS Parameter Code` <dbl>,
#   `AQS Parameter Description` <chr>, `Method Code` <dbl>,
#   `Method Description` <chr>, `CBSA Code` <dbl>, `CBSA Name` <chr>,
#   `State FIPS Code` <chr>, State <chr>, `County FIPS Code` <chr>,
#   County <chr>, `Site Latitude` <dbl>, `Site Longitude` <dbl>
str(data2002)
spc_tbl_ [15,976 × 22] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
 $ Date                          : chr [1:15976] "01/05/2002" "01/06/2002" "01/08/2002" "01/11/2002" ...
 $ Source                        : chr [1:15976] "AQS" "AQS" "AQS" "AQS" ...
 $ Site ID                       : chr [1:15976] "060010007" "060010007" "060010007" "060010007" ...
 $ POC                           : num [1:15976] 1 1 1 1 1 1 1 1 1 1 ...
 $ Daily Mean PM2.5 Concentration: num [1:15976] 25.1 31.6 21.4 25.9 34.5 41 29.3 15 18.8 37.9 ...
 $ Units                         : chr [1:15976] "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" ...
 $ Daily AQI Value               : num [1:15976] 81 93 74 82 98 115 89 62 69 107 ...
 $ Local Site Name               : chr [1:15976] "Livermore" "Livermore" "Livermore" "Livermore" ...
 $ Daily Obs Count               : num [1:15976] 1 1 1 1 1 1 1 1 1 1 ...
 $ Percent Complete              : num [1:15976] 100 100 100 100 100 100 100 100 100 100 ...
 $ AQS Parameter Code            : num [1:15976] 88101 88101 88101 88101 88101 ...
 $ AQS Parameter Description     : chr [1:15976] "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" ...
 $ Method Code                   : num [1:15976] 120 120 120 120 120 120 120 120 120 120 ...
 $ Method Description            : chr [1:15976] "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" ...
 $ CBSA Code                     : num [1:15976] 41860 41860 41860 41860 41860 ...
 $ CBSA Name                     : chr [1:15976] "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" ...
 $ State FIPS Code               : chr [1:15976] "06" "06" "06" "06" ...
 $ State                         : chr [1:15976] "California" "California" "California" "California" ...
 $ County FIPS Code              : chr [1:15976] "001" "001" "001" "001" ...
 $ County                        : chr [1:15976] "Alameda" "Alameda" "Alameda" "Alameda" ...
 $ Site Latitude                 : num [1:15976] 37.7 37.7 37.7 37.7 37.7 ...
 $ Site Longitude                : num [1:15976] -122 -122 -122 -122 -122 ...
 - attr(*, "spec")=
  .. cols(
  ..   Date = col_character(),
  ..   Source = col_character(),
  ..   `Site ID` = col_character(),
  ..   POC = col_double(),
  ..   `Daily Mean PM2.5 Concentration` = col_double(),
  ..   Units = col_character(),
  ..   `Daily AQI Value` = col_double(),
  ..   `Local Site Name` = col_character(),
  ..   `Daily Obs Count` = col_double(),
  ..   `Percent Complete` = col_double(),
  ..   `AQS Parameter Code` = col_double(),
  ..   `AQS Parameter Description` = col_character(),
  ..   `Method Code` = col_double(),
  ..   `Method Description` = col_character(),
  ..   `CBSA Code` = col_double(),
  ..   `CBSA Name` = col_character(),
  ..   `State FIPS Code` = col_character(),
  ..   State = col_character(),
  ..   `County FIPS Code` = col_character(),
  ..   County = col_character(),
  ..   `Site Latitude` = col_double(),
  ..   `Site Longitude` = col_double()
  .. )
 - attr(*, "problems")=<externalptr> 
str(data2022)
spc_tbl_ [59,918 × 22] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
 $ Date                          : chr [1:59918] "01/01/2022" "01/02/2022" "01/03/2022" "01/04/2022" ...
 $ Source                        : chr [1:59918] "AQS" "AQS" "AQS" "AQS" ...
 $ Site ID                       : chr [1:59918] "060010007" "060010007" "060010007" "060010007" ...
 $ POC                           : num [1:59918] 3 3 3 3 3 3 3 3 3 3 ...
 $ Daily Mean PM2.5 Concentration: num [1:59918] 12.7 13.9 7.1 3.7 4.2 3.8 2.3 6.9 13.6 11.2 ...
 $ Units                         : chr [1:59918] "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" ...
 $ Daily AQI Value               : num [1:59918] 58 60 39 21 23 21 13 38 59 55 ...
 $ Local Site Name               : chr [1:59918] "Livermore" "Livermore" "Livermore" "Livermore" ...
 $ Daily Obs Count               : num [1:59918] 1 1 1 1 1 1 1 1 1 1 ...
 $ Percent Complete              : num [1:59918] 100 100 100 100 100 100 100 100 100 100 ...
 $ AQS Parameter Code            : num [1:59918] 88101 88101 88101 88101 88101 ...
 $ AQS Parameter Description     : chr [1:59918] "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" ...
 $ Method Code                   : num [1:59918] 170 170 170 170 170 170 170 170 170 170 ...
 $ Method Description            : chr [1:59918] "Met One BAM-1020 Mass Monitor w/VSCC" "Met One BAM-1020 Mass Monitor w/VSCC" "Met One BAM-1020 Mass Monitor w/VSCC" "Met One BAM-1020 Mass Monitor w/VSCC" ...
 $ CBSA Code                     : num [1:59918] 41860 41860 41860 41860 41860 ...
 $ CBSA Name                     : chr [1:59918] "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" ...
 $ State FIPS Code               : chr [1:59918] "06" "06" "06" "06" ...
 $ State                         : chr [1:59918] "California" "California" "California" "California" ...
 $ County FIPS Code              : chr [1:59918] "001" "001" "001" "001" ...
 $ County                        : chr [1:59918] "Alameda" "Alameda" "Alameda" "Alameda" ...
 $ Site Latitude                 : num [1:59918] 37.7 37.7 37.7 37.7 37.7 ...
 $ Site Longitude                : num [1:59918] -122 -122 -122 -122 -122 ...
 - attr(*, "spec")=
  .. cols(
  ..   Date = col_character(),
  ..   Source = col_character(),
  ..   `Site ID` = col_character(),
  ..   POC = col_double(),
  ..   `Daily Mean PM2.5 Concentration` = col_double(),
  ..   Units = col_character(),
  ..   `Daily AQI Value` = col_double(),
  ..   `Local Site Name` = col_character(),
  ..   `Daily Obs Count` = col_double(),
  ..   `Percent Complete` = col_double(),
  ..   `AQS Parameter Code` = col_double(),
  ..   `AQS Parameter Description` = col_character(),
  ..   `Method Code` = col_double(),
  ..   `Method Description` = col_character(),
  ..   `CBSA Code` = col_double(),
  ..   `CBSA Name` = col_character(),
  ..   `State FIPS Code` = col_character(),
  ..   State = col_character(),
  ..   `County FIPS Code` = col_character(),
  ..   County = col_character(),
  ..   `Site Latitude` = col_double(),
  ..   `Site Longitude` = col_double()
  .. )
 - attr(*, "problems")=<externalptr> 
table(data2002$Date)

01/01/2002 01/02/2002 01/03/2002 01/04/2002 01/05/2002 01/06/2002 01/07/2002 
        18        102         18         19         83         19         19 
01/08/2002 01/09/2002 01/10/2002 01/11/2002 01/12/2002 01/13/2002 01/14/2002 
        99         21         19         73         20         16        104 
01/15/2002 01/16/2002 01/17/2002 01/18/2002 01/19/2002 01/20/2002 01/21/2002 
        20         19         83         18         17        108         18 
01/22/2002 01/23/2002 01/24/2002 01/25/2002 01/26/2002 01/27/2002 01/28/2002 
        17         75         17         18        115         18         18 
01/29/2002 01/30/2002 01/31/2002 02/01/2002 02/02/2002 02/03/2002 02/04/2002 
        76         21         13        112         17         16         77 
02/05/2002 02/06/2002 02/07/2002 02/08/2002 02/09/2002 02/10/2002 02/11/2002 
        21         22        120         21         20         83         16 
02/12/2002 02/13/2002 02/14/2002 02/15/2002 02/16/2002 02/17/2002 02/18/2002 
        20        111         20         23         84         21         21 
02/19/2002 02/20/2002 02/21/2002 02/22/2002 02/23/2002 02/24/2002 02/25/2002 
       112         16         20         85         21         21        114 
02/26/2002 02/27/2002 02/28/2002 03/01/2002 03/02/2002 03/03/2002 03/04/2002 
        19         21         83         23         20        113         20 
03/05/2002 03/06/2002 03/07/2002 03/08/2002 03/09/2002 03/10/2002 03/11/2002 
        17         82         19         20        124         23         21 
03/12/2002 03/13/2002 03/14/2002 03/15/2002 03/16/2002 03/17/2002 03/18/2002 
        86         22         21        119         24         20         80 
03/19/2002 03/20/2002 03/21/2002 03/22/2002 03/23/2002 03/24/2002 03/25/2002 
        22         21        117         22         20         83         20 
03/26/2002 03/27/2002 03/28/2002 03/29/2002 03/30/2002 03/31/2002 04/01/2002 
        20        115         18         22         88         21         16 
04/02/2002 04/03/2002 04/04/2002 04/05/2002 04/06/2002 04/07/2002 04/08/2002 
       114         15         16         67         16         17        117 
04/09/2002 04/10/2002 04/11/2002 04/12/2002 04/13/2002 04/14/2002 04/15/2002 
        15         20         73         15         12        119         16 
04/16/2002 04/17/2002 04/18/2002 04/19/2002 04/20/2002 04/21/2002 04/22/2002 
        18         68         12         14        124         15         14 
04/23/2002 04/24/2002 04/25/2002 04/26/2002 04/27/2002 04/28/2002 04/29/2002 
        75         16         14        122         17         15         73 
04/30/2002 05/01/2002 05/02/2002 05/03/2002 05/04/2002 05/05/2002 05/06/2002 
        17         15        115         12         16         71         13 
05/07/2002 05/08/2002 05/09/2002 05/10/2002 05/11/2002 05/12/2002 05/13/2002 
        15        119         14         13         76         16         15 
05/14/2002 05/15/2002 05/16/2002 05/17/2002 05/18/2002 05/19/2002 05/20/2002 
       123         16         16         69         15         15        119 
05/21/2002 05/22/2002 05/23/2002 05/24/2002 05/25/2002 05/26/2002 05/27/2002 
        15         17         73         16         15        119         18 
05/28/2002 05/29/2002 05/30/2002 05/31/2002 06/01/2002 06/02/2002 06/03/2002 
        14         69         15         16        125         16         16 
06/04/2002 06/05/2002 06/06/2002 06/07/2002 06/08/2002 06/09/2002 06/10/2002 
        76         16         15        122         16         16         71 
06/11/2002 06/12/2002 06/13/2002 06/14/2002 06/15/2002 06/16/2002 06/17/2002 
        15         17        121         16         18         71         15 
06/18/2002 06/19/2002 06/20/2002 06/21/2002 06/22/2002 06/23/2002 06/24/2002 
        17        119         17         14         74         15         15 
06/25/2002 06/26/2002 06/27/2002 06/28/2002 06/29/2002 06/30/2002 07/01/2002 
       126         16         20         71         16         16        118 
07/02/2002 07/03/2002 07/04/2002 07/05/2002 07/06/2002 07/07/2002 07/08/2002 
        16         19         74         18         17        121         16 
07/09/2002 07/10/2002 07/11/2002 07/12/2002 07/13/2002 07/14/2002 07/15/2002 
        15         70         17         16        120         18         16 
07/16/2002 07/17/2002 07/18/2002 07/19/2002 07/20/2002 07/21/2002 07/22/2002 
        72         15         16        125         19         16         68 
07/23/2002 07/24/2002 07/25/2002 07/26/2002 07/27/2002 07/28/2002 07/29/2002 
        18         16        119         18         19         67         18 
07/30/2002 07/31/2002 08/01/2002 08/02/2002 08/03/2002 08/04/2002 08/05/2002 
        14        111         16         15         68         15         14 
08/06/2002 08/07/2002 08/08/2002 08/09/2002 08/10/2002 08/11/2002 08/12/2002 
       110         13         16         68         17         15        114 
08/13/2002 08/14/2002 08/15/2002 08/16/2002 08/17/2002 08/18/2002 08/19/2002 
        16         16         58         12         15        107         14 
08/20/2002 08/21/2002 08/22/2002 08/23/2002 08/24/2002 08/25/2002 08/26/2002 
        13         65         13         10        113         14         13 
08/27/2002 08/28/2002 08/29/2002 08/30/2002 08/31/2002 09/01/2002 09/02/2002 
        63         14         17        113         15         15         64 
09/03/2002 09/04/2002 09/05/2002 09/06/2002 09/07/2002 09/08/2002 09/09/2002 
        13         14        121         14         14         73         13 
09/10/2002 09/11/2002 09/12/2002 09/13/2002 09/14/2002 09/15/2002 09/16/2002 
        14        119         14         15         73         13         14 
09/17/2002 09/18/2002 09/19/2002 09/20/2002 09/21/2002 09/22/2002 09/23/2002 
       120         16         15         74         15         13        118 
09/24/2002 09/25/2002 09/26/2002 09/27/2002 09/28/2002 09/29/2002 09/30/2002 
        16         15         75         14         13        121         14 
10/01/2002 10/02/2002 10/03/2002 10/04/2002 10/05/2002 10/06/2002 10/07/2002 
        15         79         19         17        119         19         17 
10/08/2002 10/09/2002 10/10/2002 10/11/2002 10/12/2002 10/13/2002 10/14/2002 
        84         20         20        114         21         20         82 
10/15/2002 10/16/2002 10/17/2002 10/18/2002 10/19/2002 10/20/2002 10/21/2002 
        19         19        117         17         20         87         17 
10/22/2002 10/23/2002 10/24/2002 10/25/2002 10/26/2002 10/27/2002 10/28/2002 
        19        122         19         21         83         18         19 
10/29/2002 10/30/2002 10/31/2002 11/01/2002 11/02/2002 11/03/2002 11/04/2002 
       119         21         19         84         18         19        112 
11/05/2002 11/06/2002 11/07/2002 11/08/2002 11/09/2002 11/10/2002 11/11/2002 
        20         21         83         21         20        113         18 
11/12/2002 11/13/2002 11/14/2002 11/15/2002 11/16/2002 11/17/2002 11/18/2002 
        18         81         18         21        116         19         18 
11/19/2002 11/20/2002 11/21/2002 11/22/2002 11/23/2002 11/24/2002 11/25/2002 
        85         22         23        115         22         20         73 
11/26/2002 11/27/2002 11/28/2002 11/29/2002 11/30/2002 12/01/2002 12/02/2002 
        20         19        115         24         26         82         19 
12/03/2002 12/04/2002 12/05/2002 12/06/2002 12/07/2002 12/08/2002 12/09/2002 
        21        117         20         23         82         18         16 
12/10/2002 12/11/2002 12/12/2002 12/13/2002 12/14/2002 12/15/2002 12/16/2002 
       114         21         18         81         17         16        104 
12/17/2002 12/18/2002 12/19/2002 12/20/2002 12/21/2002 12/22/2002 12/23/2002 
        18         19         80         17         19        110         17 
12/24/2002 12/25/2002 12/26/2002 12/27/2002 12/28/2002 12/29/2002 12/30/2002 
        23         88         21         18        119         23         21 
12/31/2002 
        91 
table(data2022$Date)

01/01/2022 01/02/2022 01/03/2022 01/04/2022 01/05/2022 01/06/2022 01/07/2022 
       150        183        147        150        203        145        146 
01/08/2022 01/09/2022 01/10/2022 01/11/2022 01/12/2022 01/13/2022 01/14/2022 
       185        148        147        210        149        149        185 
01/15/2022 01/16/2022 01/17/2022 01/18/2022 01/19/2022 01/20/2022 01/21/2022 
       153        152        214        149        153        186        152 
01/22/2022 01/23/2022 01/24/2022 01/25/2022 01/26/2022 01/27/2022 01/28/2022 
       153        210        152        151        185        148        146 
01/29/2022 01/30/2022 01/31/2022 02/01/2022 02/02/2022 02/03/2022 02/04/2022 
       210        150        146        184        154        157        207 
02/05/2022 02/06/2022 02/07/2022 02/08/2022 02/09/2022 02/10/2022 02/11/2022 
       155        155        188        151        150        209        153 
02/12/2022 02/13/2022 02/14/2022 02/15/2022 02/16/2022 02/17/2022 02/18/2022 
       154        190        152        154        211        155        154 
02/19/2022 02/20/2022 02/21/2022 02/22/2022 02/23/2022 02/24/2022 02/25/2022 
       191        154        153        219        154        157        193 
02/26/2022 02/27/2022 02/28/2022 03/01/2022 03/02/2022 03/03/2022 03/04/2022 
       156        156        213        152        153        185        150 
03/05/2022 03/06/2022 03/07/2022 03/08/2022 03/09/2022 03/10/2022 03/11/2022 
       149        213        149        151        188        150        146 
03/12/2022 03/13/2022 03/14/2022 03/15/2022 03/16/2022 03/17/2022 03/18/2022 
       202        145        143        184        149        151        211 
03/19/2022 03/20/2022 03/21/2022 03/22/2022 03/23/2022 03/24/2022 03/25/2022 
       151        151        185        148        147        197        143 
03/26/2022 03/27/2022 03/28/2022 03/29/2022 03/30/2022 03/31/2022 04/01/2022 
       142        179        142        145        200        144        143 
04/02/2022 04/03/2022 04/04/2022 04/05/2022 04/06/2022 04/07/2022 04/08/2022 
       183        148        148        201        148        149        182 
04/09/2022 04/10/2022 04/11/2022 04/12/2022 04/13/2022 04/14/2022 04/15/2022 
       148        148        205        148        146        178        147 
04/16/2022 04/17/2022 04/18/2022 04/19/2022 04/20/2022 04/21/2022 04/22/2022 
       149        206        147        143        180        145        142 
04/23/2022 04/24/2022 04/25/2022 04/26/2022 04/27/2022 04/28/2022 04/29/2022 
       206        144        145        181        146        144        203 
04/30/2022 05/01/2022 05/02/2022 05/03/2022 05/04/2022 05/05/2022 05/06/2022 
       146        146        182        147        148        210        147 
05/07/2022 05/08/2022 05/09/2022 05/10/2022 05/11/2022 05/12/2022 05/13/2022 
       146        181        146        145        200        145        145 
05/14/2022 05/15/2022 05/16/2022 05/17/2022 05/18/2022 05/19/2022 05/20/2022 
       185        150        146        212        150        148        184 
05/21/2022 05/22/2022 05/23/2022 05/24/2022 05/25/2022 05/26/2022 05/27/2022 
       147        147        203        145        150        187        148 
05/28/2022 05/29/2022 05/30/2022 05/31/2022 06/01/2022 06/02/2022 06/03/2022 
       148        214        147        146        184        149        148 
06/04/2022 06/05/2022 06/06/2022 06/07/2022 06/08/2022 06/09/2022 06/10/2022 
       201        151        147        186        150        143        209 
06/11/2022 06/12/2022 06/13/2022 06/14/2022 06/15/2022 06/16/2022 06/17/2022 
       147        150        186        148        146        202        150 
06/18/2022 06/19/2022 06/20/2022 06/21/2022 06/22/2022 06/23/2022 06/24/2022 
       151        188        147        146        207        144        149 
06/25/2022 06/26/2022 06/27/2022 06/28/2022 06/29/2022 06/30/2022 07/01/2022 
       184        148        149        202        149        146        175 
07/02/2022 07/03/2022 07/04/2022 07/05/2022 07/06/2022 07/07/2022 07/08/2022 
       144        140        203        141        143        178        139 
07/09/2022 07/10/2022 07/11/2022 07/12/2022 07/13/2022 07/14/2022 07/15/2022 
       138        193        136        138        172        141        143 
07/16/2022 07/17/2022 07/18/2022 07/19/2022 07/20/2022 07/21/2022 07/22/2022 
       205        148        140        172        136        136        194 
07/23/2022 07/24/2022 07/25/2022 07/26/2022 07/27/2022 07/28/2022 07/29/2022 
       144        145        177        143        144        205        141 
07/30/2022 07/31/2022 08/01/2022 08/02/2022 08/03/2022 08/04/2022 08/05/2022 
       142        175        146        144        199        149        145 
08/06/2022 08/07/2022 08/08/2022 08/09/2022 08/10/2022 08/11/2022 08/12/2022 
       181        144        143        206        147        150        184 
08/13/2022 08/14/2022 08/15/2022 08/16/2022 08/17/2022 08/18/2022 08/19/2022 
       150        149        203        145        144        181        147 
08/20/2022 08/21/2022 08/22/2022 08/23/2022 08/24/2022 08/25/2022 08/26/2022 
       148        211        146        145        181        150        148 
08/27/2022 08/28/2022 08/29/2022 08/30/2022 08/31/2022 09/01/2022 09/02/2022 
       196        150        144        181        150        147        203 
09/03/2022 09/04/2022 09/05/2022 09/06/2022 09/07/2022 09/08/2022 09/09/2022 
       150        148        183        144        148        201        151 
09/10/2022 09/11/2022 09/12/2022 09/13/2022 09/14/2022 09/15/2022 09/16/2022 
       152        184        151        150        203        150        150 
09/17/2022 09/18/2022 09/19/2022 09/20/2022 09/21/2022 09/22/2022 09/23/2022 
       186        151        150        206        151        147        183 
09/24/2022 09/25/2022 09/26/2022 09/27/2022 09/28/2022 09/29/2022 09/30/2022 
       148        148        206        151        154        189        147 
10/01/2022 10/02/2022 10/03/2022 10/04/2022 10/05/2022 10/06/2022 10/07/2022 
       151        205        150        151        184        154        156 
10/08/2022 10/09/2022 10/10/2022 10/11/2022 10/12/2022 10/13/2022 10/14/2022 
       214        154        154        185        154        154        207 
10/15/2022 10/16/2022 10/17/2022 10/18/2022 10/19/2022 10/20/2022 10/21/2022 
       154        157        186        150        150        212        153 
10/22/2022 10/23/2022 10/24/2022 10/25/2022 10/26/2022 10/27/2022 10/28/2022 
       155        189        150        150        199        147        147 
10/29/2022 10/30/2022 10/31/2022 11/01/2022 11/02/2022 11/03/2022 11/04/2022 
       180        148        146        214        152        152        185 
11/05/2022 11/06/2022 11/07/2022 11/08/2022 11/09/2022 11/10/2022 11/11/2022 
       150        152        207        150        153        185        156 
11/12/2022 11/13/2022 11/14/2022 11/15/2022 11/16/2022 11/17/2022 11/18/2022 
       155        215        153        154        184        157        156 
11/19/2022 11/20/2022 11/21/2022 11/22/2022 11/23/2022 11/24/2022 11/25/2022 
       212        156        152        187        151        152        205 
11/26/2022 11/27/2022 11/28/2022 11/29/2022 11/30/2022 12/01/2022 12/02/2022 
       150        155        184        153        155        204        151 
12/03/2022 12/04/2022 12/05/2022 12/06/2022 12/07/2022 12/08/2022 12/09/2022 
       152        184        149        149        213        154        151 
12/10/2022 12/11/2022 12/12/2022 12/13/2022 12/14/2022 12/15/2022 12/16/2022 
       190        153        155        211        156        153        182 
12/17/2022 12/18/2022 12/19/2022 12/20/2022 12/21/2022 12/22/2022 12/23/2022 
       151        151        209        152        150        186        151 
12/24/2022 12/25/2022 12/26/2022 12/27/2022 12/28/2022 12/29/2022 12/30/2022 
       152        204        154        147        178        149        148 
12/31/2022 
       199 
summary(data2002$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    7.00   12.00   16.12   20.50  104.30 
summary(data2022$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 -6.700   4.100   6.800   8.414  10.700 302.500 
layout(matrix(1:2, nrow=1))
hist(data2002$`Daily Mean PM2.5 Concentration`)
hist(data2022$`Daily Mean PM2.5 Concentration`)

layout(1)
summary(data2002[,20:22])
    County          Site Latitude   Site Longitude  
 Length:15976       Min.   :32.63   Min.   :-124.2  
 Class :character   1st Qu.:34.07   1st Qu.:-121.4  
 Mode  :character   Median :35.36   Median :-119.1  
                    Mean   :36.00   Mean   :-119.4  
                    3rd Qu.:37.77   3rd Qu.:-117.9  
                    Max.   :41.71   Max.   :-115.5  
summary(data2022[,20:22])
    County          Site Latitude   Site Longitude  
 Length:59918       Min.   :32.58   Min.   :-124.2  
 Class :character   1st Qu.:34.07   1st Qu.:-121.4  
 Mode  :character   Median :36.49   Median :-119.6  
                    Mean   :36.25   Mean   :-119.6  
                    3rd Qu.:37.96   3rd Qu.:-117.9  
                    Max.   :41.76   Max.   :-115.5  
layout(matrix(1:2, nrow=1))
hist(data2002$`Site Latitude`)
hist(data2022$`Site Latitude`)

hist(data2002$`Site Longitude`)
hist(data2022$`Site Longitude`)

layout(1)
summary(data2002$`Daily AQI Value`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00   39.00   56.00   59.28   72.00  185.00 
summary(data2022$`Daily AQI Value`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00   23.00   38.00   39.22   54.00  454.00 
hist(data2002$`Daily AQI Value`)

hist(data2022$`Daily AQI Value`)

table(data2002$County)

        Alameda           Butte       Calaveras          Colusa    Contra Costa 
            201             473              60              95             276 
      Del Norte       El Dorado          Fresno        Humboldt        Imperial 
            110             208             760              59             342 
           Inyo            Kern           Kings            Lake     Los Angeles 
            277            1800              83              61            1879 
          Marin        Mariposa       Mendocino          Merced           Modoc 
             97             290             122              89               2 
           Mono        Monterey          Nevada          Orange          Placer 
            111             120             226             470              60 
         Plumas       Riverside      Sacramento      San Benito  San Bernardino 
            177            1017             819             119             835 
      San Diego   San Francisco     San Joaquin San Luis Obispo       San Mateo 
           1350             196             124             168             100 
  Santa Barbara     Santa Clara      Santa Cruz          Shasta        Siskiyou 
            152             459              61             271             104 
         Solano          Sonoma      Stanislaus          Sutter         Trinity 
             97              93             183             114              90 
         Tulare         Ventura            Yolo 
            508             556             112 
table(data2022$County)

        Alameda           Butte       Calaveras          Colusa    Contra Costa 
           1793            1121             355             401             815 
      Del Norte       El Dorado          Fresno           Glenn        Humboldt 
            458             228            2761             351             116 
       Imperial            Inyo            Kern           Kings            Lake 
           1625            3186            2333             721              61 
    Los Angeles          Madera           Marin        Mariposa       Mendocino 
           5070             360             476             574             701 
         Merced            Mono        Monterey          Nevada          Orange 
            719             944            1119             734             879 
         Placer          Plumas       Riverside      Sacramento      San Benito 
           1774            1118            4546            2556             478 
 San Bernardino       San Diego   San Francisco     San Joaquin San Luis Obispo 
           2715            4598             361            1016            1427 
      San Mateo   Santa Barbara     Santa Clara      Santa Cruz          Shasta 
            356            1247            1182             709             480 
       Siskiyou          Solano          Sonoma      Stanislaus          Sutter 
            424             720             348             745             712 
         Tehama         Trinity          Tulare         Ventura            Yolo 
            347             402            1223            2152             381 
table(data2002$State)

California 
     15976 
table(data2022$State)

California 
     59918 
table(data2002$`Daily Obs Count`)

    1 
15976 
table(data2022$`Daily Obs Count`)

    1 
59918 
table(data2002$`Percent Complete`)

  100 
15976 
table(data2022$`Percent Complete`)

  100 
59918 
table(data2002$`Method Description`)

                         Andersen RAAS2.5-300 PM2.5 SEQ w/WINS 
                                                          8651 
IMPROVE Module A with Cyclone Inlet-Teflon Filter, 2.2 sq. cm. 
                                                          1873 
                                 Met One SASS/SuperSASS Teflon 
                                                          1262 
                                  Met-One BAM-1020 W/PM2.5 SCC 
                                                          1417 
                         R & P Model 2000 PM2.5 Sampler w/WINS 
                                                          2088 
                      R & P Model 2025 PM2.5 Sequential w/WINS 
                                                           685 
table(data2022$`Method Description`)

IMPROVE Module A with Cyclone Inlet-Teflon Filter, 2.2 sq. cm. 
                                                          2143 
                          Met One BAM-1020 Mass Monitor w/VSCC 
                                                         29722 
            Met One BAM-1022 Mass Monitor w/ VSCC or TE-PM2.5C 
                                                          1775 
                                 Met One E-FRM PM2.5 with VSCC 
                                                            61 
                             Met One E-SEQ-FRM PM2.5 with VSCC 
                                                           736 
                                 Met One SASS/SuperSASS Teflon 
                                                           634 
                                      Met-One BAM W/PM2.5 VSCC 
                                                          1376 
                                  Met-One BAM-1020 W/PM2.5 SCC 
                                                          8890 
                                  Met-one BAM-1022 W/PM2.5 SCC 
                                                           619 
                    R & P Model 2000 PM-2.5 Air Sampler w/VSCC 
                                                           516 
         R & P Model 2025 PM-2.5 Sequential Air Sampler w/VSCC 
                                                          5297 
                                      Teledyne T640 at 5.0 LPM 
                                                          1344 
                          Teledyne T640 at 5.0 LPM (Corrected) 
                                                          1706 
     Teledyne T640 at 5.0 LPM w/Network Data Alignment enabled 
                                                           362 
                                   Teledyne T640X at 16.67 LPM 
                                                          1977 
                       Teledyne T640X at 16.67 LPM (Corrected) 
                                                          2043 
                 Thermo Scientific 5014i or FH62C14-DHS w/VSCC 
                                                           359 
    Thermo Scientific TEOM 1400 FDMS or 1405 8500C FDMS w/VSCC 
                                                           358 
summary(data2002$`Local Site Name`)
   Length     Class      Mode 
    15976 character character 
summary(data2022$`Local Site Name`)
   Length     Class      Mode 
    59918 character character 

Description

Both datasets contain the same 22 variables. data2002 has 15,976 rows spanning 01/01/2002–12/31/2002, while data2022 has 59,918 rows spanning 01/01/2022–12/31/2022. All data were collected in California.Both graphs of daily mean PM2.5 concentration are right-skewed. The daily AQI levels are also right-skewed for both 2002 and 2022; however, the 2002 data appears closer to a normal distribution compared to the 2022 data, where most values are clustered between 0–100. Values in the 2022 data set should not include negatives, since PM2.5 levels cannot be negative. These values should therefore be set to NA.

The larger 2022 dataset likely reflects a denser monitoring network and/or greater completeness, such as additional methods used for data collection in that year. In 2002, Madera, Tehama, and Glenn counties do not appear in the dataset, reflecting changes in network coverage over time. Based on online information, Glenn County was not monitored at that time because it had consistently good air quality, being a rural area. Madera County was not included because it had some of the worst air quality in the nation. In 2022, Modoc County data was not collected. According to internet sources, this may have been due to a large wildfire that significantly affected the county.

Question 2:

combined <- rbind(data2002, data2022) 
str(combined)
spc_tbl_ [75,894 × 22] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
 $ Date                          : chr [1:75894] "01/05/2002" "01/06/2002" "01/08/2002" "01/11/2002" ...
 $ Source                        : chr [1:75894] "AQS" "AQS" "AQS" "AQS" ...
 $ Site ID                       : chr [1:75894] "060010007" "060010007" "060010007" "060010007" ...
 $ POC                           : num [1:75894] 1 1 1 1 1 1 1 1 1 1 ...
 $ Daily Mean PM2.5 Concentration: num [1:75894] 25.1 31.6 21.4 25.9 34.5 41 29.3 15 18.8 37.9 ...
 $ Units                         : chr [1:75894] "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" "ug/m3 LC" ...
 $ Daily AQI Value               : num [1:75894] 81 93 74 82 98 115 89 62 69 107 ...
 $ Local Site Name               : chr [1:75894] "Livermore" "Livermore" "Livermore" "Livermore" ...
 $ Daily Obs Count               : num [1:75894] 1 1 1 1 1 1 1 1 1 1 ...
 $ Percent Complete              : num [1:75894] 100 100 100 100 100 100 100 100 100 100 ...
 $ AQS Parameter Code            : num [1:75894] 88101 88101 88101 88101 88101 ...
 $ AQS Parameter Description     : chr [1:75894] "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" "PM2.5 - Local Conditions" ...
 $ Method Code                   : num [1:75894] 120 120 120 120 120 120 120 120 120 120 ...
 $ Method Description            : chr [1:75894] "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" "Andersen RAAS2.5-300 PM2.5 SEQ w/WINS" ...
 $ CBSA Code                     : num [1:75894] 41860 41860 41860 41860 41860 ...
 $ CBSA Name                     : chr [1:75894] "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" "San Francisco-Oakland-Hayward, CA" ...
 $ State FIPS Code               : chr [1:75894] "06" "06" "06" "06" ...
 $ State                         : chr [1:75894] "California" "California" "California" "California" ...
 $ County FIPS Code              : chr [1:75894] "001" "001" "001" "001" ...
 $ County                        : chr [1:75894] "Alameda" "Alameda" "Alameda" "Alameda" ...
 $ Site Latitude                 : num [1:75894] 37.7 37.7 37.7 37.7 37.7 ...
 $ Site Longitude                : num [1:75894] -122 -122 -122 -122 -122 ...
 - attr(*, "spec")=
  .. cols(
  ..   Date = col_character(),
  ..   Source = col_character(),
  ..   `Site ID` = col_character(),
  ..   POC = col_double(),
  ..   `Daily Mean PM2.5 Concentration` = col_double(),
  ..   Units = col_character(),
  ..   `Daily AQI Value` = col_double(),
  ..   `Local Site Name` = col_character(),
  ..   `Daily Obs Count` = col_double(),
  ..   `Percent Complete` = col_double(),
  ..   `AQS Parameter Code` = col_double(),
  ..   `AQS Parameter Description` = col_character(),
  ..   `Method Code` = col_double(),
  ..   `Method Description` = col_character(),
  ..   `CBSA Code` = col_double(),
  ..   `CBSA Name` = col_character(),
  ..   `State FIPS Code` = col_character(),
  ..   State = col_character(),
  ..   `County FIPS Code` = col_character(),
  ..   County = col_character(),
  ..   `Site Latitude` = col_double(),
  ..   `Site Longitude` = col_double()
  .. )
 - attr(*, "problems")=<externalptr> 
summary(combined$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -6.70    4.40    7.60   10.04   12.20  302.50 
data2002$year <- 2002L
data2022$year <- 2022L
combined <- rbind(data2002, data2022)
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
combined <- combined %>%
  mutate(
    lat = `Site Latitude`,  
    lon = `Site Longitude`   
  )
table(combined$year)

 2002  2022 
15976 59918 

Description I combined both data set using rbind, and made a new column for year and checked. 2002 has 15976 rows and 2022 has 59918 which matches with original observation. Also, I made lat and long columns, which will make me easier when making a map for question 3.

Question 3

library(leaflet)

leaflet(combined) %>%
  addProviderTiles("OpenStreetMap") %>%
  addCircles(
    data = subset(combined, year == "2002"),
    lng = ~lon, lat = ~lat,
    color = "red", fillColor = "red",
  opacity = 1, fillOpacity = 0.5, radius = 5,
    label = ~paste0("Site 2002)")
  ) %>%
  addCircles(
    data = subset(combined, year == "2022"),
    lng = ~lon, lat = ~lat,
    color = "blue", fillColor = "blue",
  opacity = 1, fillOpacity = 0.5, radius = 1,
    label = ~paste0("Site 2022)")
  ) %>%
  addLegend(
    "bottomleft",
    colors = c("red", "blue"),
    labels = c("2002", "2022"),
    title = "Monitoring year",
    opacity = 1
  )

Description The distribution of monitoring sites in California expanded substantially between 2002 and 2022. From the map, we can see some overlaps in blue and red dots, but there are more blue dots than red dots meaning that there are more monitor site in 2022, so more data were collected. The 2022 monitor sites covers more denser statewide coverage.

Question 4

summary(combined$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -6.70    4.40    7.60   10.04   12.20  302.50 
mean(combined$`Daily Mean PM2.5 Concentration` < 0, na.rm = TRUE)
[1] 0.002832899
combined_clean <- combined %>%
  filter(`Daily Mean PM2.5 Concentration` >= 0)

summary(combined_clean$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    4.50    7.60   10.07   12.20  302.50 

Description From both Question 1 and Question 4, we can see that the Daily mean PM2.5 concentrations are contains negative values, which are not correct since PM2.5 should never be negative, so in this step, I dropped all the negative numbers. I made a new data set called combined_cleaned to make sure I keep a copy of the original. I also tray to see the proportion of implausible values ()

Question 5

library(dplyr)

combined <- combined_clean %>%
  mutate(
    Date = as.Date(Date, format = "%m/%d/%Y"),
    year = format(Date, "%Y")                   
  ) #I changed combined_clean data back to combined and use made an extra column for data 

Level1 State:

library(dplyr)
state1 <- combined %>%
  mutate(
    Date = as.Date(Date, "%m/%d/%Y"),
    year = as.integer(format(Date, "%Y")),
    pm   = ifelse(`Daily Mean PM2.5 Concentration` < 0, NA, 
                  `Daily Mean PM2.5 Concentration`)
  )
  
library(ggplot2)

ggplot(state1, aes(x = factor(year), y = pm, )) +
  geom_violin() +
  labs(x = "Year", y = "Daily PM2.5 (µg/m³)",
       title = "Statewide PM2.5 distributions")

Description Looking at statewide PM2.5 distribution, we can see that the wider range (which means more density of data), for 2022 is lower compare to 2002, which means that they have a lower Daily PM2.5 overall. At the same time, we see a tall spike that goes beyond 200 or even 300, suggesting outliers that has higher Daily mean PM2.5 concentration, so we need to examine it at county level to see what counties have those extreme data.

Level2 County:

library(dplyr)
library(ggplot2)

combined %>%
  mutate(
    pm   = ifelse(`Daily Mean PM2.5 Concentration` < 0, NA,  
                  `Daily Mean PM2.5 Concentration`)
  ) %>% 
  filter(!is.na(pm)) %>% 
  ggplot() +
  geom_violin(mapping = aes(x = factor(year), y = pm, fill = factor(year))) +
  facet_wrap(~ County, nrow = 3) +
  labs(x = "Year", y = "Daily PM2.5 (µg/m³)",
       title = "PM2.5 distributions by county, 2002 vs 2022") 

Description For different counties, we can see that some violin plots confirm our finding from Question 1, where Glenn, Madera, Modoc, and Tehama are missing one year of data. Overall, there is a decrease in daily mean PM2.5 concentrations from 2002 to 2022, as indicated by the blue violins being lower and narrower compared to the red. In urban areas, we see a general decreasing trend. However, there are exceptions in El Dorado, Imperial, Mariposa, Mono, Nevada, Placer, Plumas, Riverside, Siskiyou, and Trinity counties, where tall spikes extend above 100 µg/m³ and in some cases above 200 µg/m³. Several factors may explain these patterns. First, wildfire smoke, which is common in the summer, is likely to increase PM2.5 levels. In addition, geographic features such as mountain basins and foothills can trap smoke under inversions, resulting in episodes of high PM concentrations. To confirm my findings, I filtered months 6-9 which are summer where fire is likely to occur and same result applied indicating wildfire smokes’ impact in those area.

Level3 City:

la <- combined %>%
  mutate(
    Date = as.Date(Date, format = "%m/%d/%Y"),
    year = as.integer(format(Date, "%Y")),
    pm   = ifelse(`Daily Mean PM2.5 Concentration` < 0, NA_real_,
                  `Daily Mean PM2.5 Concentration`),
    lat  = `Site Latitude`,
    lon  = `Site Longitude`,
    site = `Site ID`
  ) 
summary(la$`Daily Mean PM2.5 Concentration`)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    4.50    7.60   10.07   12.20  302.50 
library(ggplot2)

ggplot(la) +
  geom_violin(aes(x = factor(year), y = pm, fill = factor(year))) +
  labs(x = "Year", y = "Daily PM2.5 (µg/m³)",
       title = "Los Angeles County: daily PM2.5 distributions by monitoring site") 

Description I filtered out only data points from LA. From LA county data, we can see that the mean PM2.5 concentration varies from 0 to 302.05. We can see that similar to statewide data, LA data also has a wider range of PM2.5 that is lower than 2002, but a high spike indicating outliers in the data point. Looking at the data, the highest 7/31/2025 and the next few data points range from August and September, which make sense because I searched up online and we can see that most wildfires happen in July through October.

The primary question you will answer is whether daily concentrations of PM (particulate matter air pollution with aerodynamic diameter less than 2.5m) decreased in California over the 20 years spanning from 2002 to 2022. The answer to this question is that most counties have experienced decreased daily concentrations of PM2.5 (particulate matter air pollution with an aerodynamic diameter less than 2.5 µm). However, in some counties, levels are even higher, particularly where wildfires are prevalent or where industrial activity is concentrated. In addition, dry, desert-like atmospheric conditions can also contribute to elevated PM2.5 levels.